export default{
    data(){
        return {
           //设置默认的分享参数
           //如果页面不设置share，就触发这个默认的分享
            share: {
                title: '收费站上下班结算',
                path:'/pages/home/home',
                imageUrl: 'https://cdn.shanzhonglei.com/ex2-share.jpg',
                desc:'',
                content:''
            },
			timeline: {
				title: '收费站上下班结算'
			},
        }
    },
	// // 分享到朋友圈
	// onShareTimeline() {
	// 	console.log("this.timeline.path：", this.timeline.path)
	// 	return {
	// 		title:this.timeline.title,
	// 		path: this.timeline.path,
	// 		imageUrl: this.timeline.path,
	// 		success(res){
	// 		    uni.showToast({
	// 		        title:'onShareTimeline...分享成功'
	// 		    })
	// 			console.log(res)
	// 		},
	// 		fail(res){
	// 		    uni.showToast({
	// 		        title:'onShareTimeline...分享失败',
	// 		        icon:'none'
	// 		    })
	// 			console.log(res)
	// 		}
	// 	};
	// },
	// 分享给好友
    onShareAppMessage(res) {
        return {
            title:this.share.title,
            path:this.share.path,
            imageUrl:this.share.imageUrl,
            desc:this.share.desc,
            content:this.share.content,
            success(res){
                uni.showToast({
                    title:'onShareAppMessage...分享成功'
                })
            },
            fail(res){
                uni.showToast({
                    title:'onShareAppMessage...分享失败',
                    icon:'none'
                })
            }
        }
    }
}